package com.zzptc.sky.waterlifer;

import android.content.Intent;
import android.content.SharedPreferences;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;

import java.util.Timer;
import java.util.TimerTask;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        new Timer().schedule(new TimerTask() {
            @Override
            public void run() {
                startActivity(new Intent(MainActivity.this,Main2Activity.class));
                finish();
            }
        },1000);


        SharedPreferences sp = getSharedPreferences("sp",MODE_APPEND);
        SharedPreferences.Editor editor = sp.edit();
        editor.putBoolean("first",true);
        editor.commit();

    }
}
